package org.zztl.json.parser;

public class Token {

    public final static int TRUE                 = 1;
    public final static int FALSE                = 2;
    public final static int NULL                 = 3;
    public final static int LBRACE               = 4; // ("{"),
    public final static int RBRACE               = 5; // ("}"),
    public final static int LBRACKET             = 6; // ("["),
    public final static int RBRACKET             = 7; // ("]"),
    public final static int COMMA                = 8; // (","),
    public final static int COLON                = 9; // (":"),
    public final static int LITERAL_STRING       = 10;
    public final static int LITERAL_INT          = 11;
    public final static int LITERAL_FLOAT        = 12;
    public final static int EOF                  = 13;

    private int type;
    private String text;

    public Token(int type, String text) {
        this.type = type;
        this.text = text;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }


    @Override
    public String toString() {
        return "Token{" +
                "type=" + type +
                ", text='" + text + '\'' +
                '}';
    }
}
